package org.webframe.entity;

import java.util.Collection;
import java.util.Date;

import org.beetl.sql.core.annotatoin.AssignID;
import org.beetl.sql.core.annotatoin.UpdateIgnore;
import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.userdetails.UserDetails;

import lombok.Data;

/**
 * @author yin.jinbiao
 * @date 2019-10-10
 */
@Data
public class SysUser implements UserDetails {

    private static final long serialVersionUID = 1L;
    @AssignID("snowflake")
    private Long id;
    private String username;
    private String password;
    private String loginname;
    
	@UpdateIgnore
    private Date createTime;
    
    private Long createBy;
    
    private Date updateTime;
    
    private Long updateBy;
    
    private String logicDelete;
    private Collection<? extends GrantedAuthority> authorities;
	public boolean isAccountNonExpired() {
		// TODO Auto-generated method stub
		return true;
	}
	public boolean isAccountNonLocked() {
		// TODO Auto-generated method stub
		return true;
	}
	public boolean isCredentialsNonExpired() {
		// TODO Auto-generated method stub
		return true;
	}
	public boolean isEnabled() {
		// TODO Auto-generated method stub
		return true;
	}

}